import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {ListComponent} from './list/list.component';
import {ShowComponent} from './show/show.component';

const routes: Routes = [
    {
        path: '',
        redirectTo: 'list',
        pathMatch: 'full'
    },
    {
        path: 'list',
        component: ListComponent,
        data: {
            breadcrumb: '角色列表'
        }
    },
    {
        path: 'show/:id',
        component: ShowComponent,
        data: {
            breadcrumb: '编辑角色'
        }
    },
    {
        path: 'add',
        component: ShowComponent,
        data: {
            breadcrumb: '添加角色'
        }
    }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class RoleRoutingModule { }
